package com.biglead.feign.clients;

import com.biglead.common.pojo.OrderInfo;
import com.biglead.common.pojo.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient("order-service")
public interface FeignOrderClient {

    @GetMapping("/order/create")
    OrderInfo createOrder(@RequestParam Long userId,@RequestParam Long goodsId);

    @GetMapping("/order/createWithRedis")
    OrderInfo createWithRedis(@RequestParam Long userId,@RequestParam Long goodsId);


    /**
     * 加载商品信息到redis中
     * @param goodsId
     */
    @GetMapping(value = "/goods/loadRoRedis/{id}")
    void testLoadGoodsToRedis(@PathVariable("id") Long goodsId);
}
